package com.bdqn;

import com.bdqn.pojo.Equip;
import com.bdqn.pojo.Player;
import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class test {

    @Test
    public void show(){
        ApplicationContext context=new ClassPathXmlApplicationContext("applicationContext.xml");
        Equip lanMoRing= (Equip) context.getBean("lanMoRing");
//         Player lanMoRing=(Player) context.getBean("zhangsan3");
        System.out.println(lanMoRing.toString());

    }
    @Test
    public void show1(){
        ApplicationContext context=new ClassPathXmlApplicationContext("applicationContext.xml");
        Player lanMoRing=(Player) context.getBean("zhangsan3");
        Player player=(Player) context.getBean("zhangsan4");
//        System.out.println(lanMoRing.getRing().getName());
        Equip equip=lanMoRing.getRing();
        player.updateEquip(equip);
//        player.pring(equip);
//        Equip lanMoRing1= lanMoRing.getLoricae();
////        Player player=new Player();
//        lanMoRing.updateEquip(lanMoRing1);
//
//        lanMoRing.pring(lanMoRing1);


    }

    

}
